import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/Home.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    children:[
      {
        path:'/',
        redirect:'/home'
      },
      {
        path: '/home',
        name: 'HomeSection',
        component: () => import('../views/Pages/HomeSection.vue')
      },   
      {
        path: '/goods',
        name: 'GoodsSection',
        component: () => import('../views/Pages/GoodsSection.vue')
      },   
      {
        path: '/about',
        name: 'AboutSection',
        component: () => import('../views/Pages/AboutSection.vue')
      },
    ]
  },
  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import('../views/AboutView.vue')
  // }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
